﻿using AutoMapper;
using MyData.ApiDto;
using MyData.Dto;
using MyData.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MyWeb.App_Start
{
    public class Configuration
    {
        public static void Configure()
        {
            Mapper.Initialize(cfg =>
            {
                cfg.AddProfile(new AutoMapperWebConfigure());
             
            });
        }
    }
    public class AutoMapperWebConfigure : Profile
    {
        public AutoMapperWebConfigure()
        {
            CreateMap<UserInfo, UserInfoDto>();
            CreateMap<Depart, DepartDto>();
            CreateMap<AdminUser, AdminUserDto>();
            CreateMap<Mobile, MobileDto>();
            CreateMap<Mobile, MobileLoginOput>();
            CreateMap<Visitor, VisitorDto>();
            CreateMap<SystemConfig, SystemConfigDto>();
            CreateMap<Holiday, HolidayDto>();
            CreateMap<AccessRecord, AccessRecordDto>();
            CreateMap<CarRecord, CarRecordDto>();
        }
    }
}